package builders;

import books.Publisher;

/**
 * Publisher builder
 */
public class PublisherBuilder implements IBuilderExampler<Publisher> {

    private String name;

    @Override
    public Publisher build() {
        return new Publisher(this);
    }

    public PublisherBuilder withName(final String aName) {
        this.setName(aName);
        return this;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    @Override
    public Publisher example() {
        return new PublisherBuilder().withName("Publisher example").build();
    }
}
